package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.BywEmployeeBillingDetailsMapper;
import com.ruoyi.system.domain.BywEmployeeBillingDetails;
import com.ruoyi.system.service.IBywEmployeeBillingDetailsService;

/**
 * 用户结算Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-05-24
 */
@Service
public class BywEmployeeBillingDetailsServiceImpl implements IBywEmployeeBillingDetailsService 
{
    @Autowired
    private BywEmployeeBillingDetailsMapper bywEmployeeBillingDetailsMapper;

    /**
     * 查询用户结算
     * 
     * @param id 用户结算主键
     * @return 用户结算
     */
    @Override
    public BywEmployeeBillingDetails selectBywEmployeeBillingDetailsById(Long id)
    {
        return bywEmployeeBillingDetailsMapper.selectBywEmployeeBillingDetailsById(id);
    }

    /**
     * 查询用户结算列表
     * 
     * @param bywEmployeeBillingDetails 用户结算
     * @return 用户结算
     */
    @Override
    public List<BywEmployeeBillingDetails> selectBywEmployeeBillingDetailsList(BywEmployeeBillingDetails bywEmployeeBillingDetails)
    {
        return bywEmployeeBillingDetailsMapper.selectBywEmployeeBillingDetailsList(bywEmployeeBillingDetails);
    }

    /**
     * 新增用户结算
     * 
     * @param bywEmployeeBillingDetails 用户结算
     * @return 结果
     */
    @Override
    public int insertBywEmployeeBillingDetails(BywEmployeeBillingDetails bywEmployeeBillingDetails)
    {
        bywEmployeeBillingDetails.setCreateTime(DateUtils.getNowDate());
        return bywEmployeeBillingDetailsMapper.insertBywEmployeeBillingDetails(bywEmployeeBillingDetails);
    }

    /**
     * 修改用户结算
     * 
     * @param bywEmployeeBillingDetails 用户结算
     * @return 结果
     */
    @Override
    public int updateBywEmployeeBillingDetails(BywEmployeeBillingDetails bywEmployeeBillingDetails)
    {
        bywEmployeeBillingDetails.setUpdateTime(DateUtils.getNowDate());
        return bywEmployeeBillingDetailsMapper.updateBywEmployeeBillingDetails(bywEmployeeBillingDetails);
    }

    /**
     * 批量删除用户结算
     * 
     * @param ids 需要删除的用户结算主键
     * @return 结果
     */
    @Override
    public int deleteBywEmployeeBillingDetailsByIds(Long[] ids)
    {
        return bywEmployeeBillingDetailsMapper.deleteBywEmployeeBillingDetailsByIds(ids);
    }

    /**
     * 删除用户结算信息
     * 
     * @param id 用户结算主键
     * @return 结果
     */
    @Override
    public int deleteBywEmployeeBillingDetailsById(Long id)
    {
        return bywEmployeeBillingDetailsMapper.deleteBywEmployeeBillingDetailsById(id);
    }
}
